﻿using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using DATAMODELLib;
using GPSOBJECTSLib;
using GPSDOCDOTNETLib;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
    private static string dir = "k:\\ProgramDesign\\Projects\\GPS\\GPSObjects Model XML\\";
    private static string confPath = dir + "DataObjectConfig.xml";
    private static string szDocumentPath = dir + "0707.xml";
    public Service () {

        //如果使用设计的组件，请取消注释以下行 
        //InitializeComponent(); 
        DocumentDotNetClass doc = new DocumentDotNetClass();
        doc.LoadDocument(confPath, szDocumentPath);



      //  DataObjectFactory df = new DataObjectFactory();
      //  df.ConfigXML = confPath;
     //   object data = df.CreateDataObject(szDocumentPath);

    }

    [WebMethod]
    public string HelloWorld() {
        string rnxPath = "k:\\ProgramDesign\\Data\\0707\\GNSSPro Files\\07011720.rnx";
        CoRinex rnx = new CoRinex();
        rnx.LoadRNXFile(rnxPath);

        IXML toXml = (IXML)rnx;
        string xml = toXml.toXml();
        return xml;
    }
    
}
